# Please install OpenAI SDK first: `pip3 install openai`

from openai import OpenAI
def chat_deepseek_ai(message):
    print(message)
    client = OpenAI(api_key="sk-901fe40dad354650b8bdc95212c129be", base_url="https://api.deepseek.com")

    response = client.chat.completions.create(
        model="deepseek-chat",
        # model="deepseek-reasoner",
        messages=[
            {"role": "system", "content": "You are a helpful assistant"},
            {"role": "user", "content": message},
        ],
        stream=False
    )
    print(str(response.choices[0].message.content))
    return str(response.choices[0].message.content)
# print(chat_deepseek_ai("给我1000字作文"))